import toastComp from './toast.vue';

export default {
	install(Vue) {
		const toastConstructor = Vue.extend(toastComp);
		const toast = new toastConstructor();

		toast.$mount(document.createElement('div'));

		document.body.appendChild(toast.$el);

		Vue.prototype.$toast = toast;
		Vue.prototype.$showToast = toast.showToast;
		Vue.component('Notify', toast);
	},
};
